home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 22 / AACD 22.iso / AACD / Online / CIM / cim_v3 / stuff / scripts / arexx / CallSign.rexx < prev    next >
Encoding:
OS/2 REXX Batch file  |  2001-05-01  |  3.5 KB  |  111 lines

  1.  
  2.  
  3.  
  4. /* 
  5.  
  6.    Name:            CallSign.rexx
  7.    Version:         $VER: CallSign_rexx 1.23 (13.03.2001)
  8.    Author:          Jan-Erik Tervo
  9.    
  10.    Description:     Will change Caller Type to 'FAX' _if_ received Ring string is 'RING2'.
  11.                     
  12.                     Change 'RING2' to your corresponding fax CallSign RING.
  13.                     
  14.                     If you don't have CallSign feature connected to your phone line then
  15.                     you may want to change 'RING2' to 'RING' and change the Type example
  16.                     to Known.
  17.                     
  18.                     Intertex (at least IX 36 Extended DL), (Telia, PowerBit) owners: 
  19.                     Distinctive Ring is enabled with command: 'AT-sdr=7'
  20.                     
  21.                     Feel free to modify this script to suite your needs.
  22.    
  23.    Requires:        AOS 3 or newer, ARexx, CIM r32 or better with ARexx Port enabled
  24.  
  25. */
  26.  
  27.  
  28.  
  29.      OPTIONS RESULTS
  30.  
  31.      ADDRESS COMMAND 'run >NIL: RequestChoice "CIM" "CallSign_rexx executing.." "OK"'
  32.  
  33.  
  34.  
  35.  
  36.  
  37.      ADDRESS CIM
  38.      
  39.      /* Is Incoming call going on? */
  40.  
  41.      DEVICE_OCP
  42.  
  43.      IF RC=5 THEN DO
  44.      
  45.                     /* Incoming call is going on, so we will continue. */
  46.  
  47.                     /* Lets get the received RING string.. */
  48.           
  49.                     RECEIVED_RINGSTR
  50.                     
  51.                     /* Lets act on received RING string */
  52.                     
  53.                     IF RESULT="RING" THEN DO
  54.                     
  55.                               ADDRESS COMMAND 'run >NIL: RequestChoice "CIM" "RING" "OK"'
  56.                               
  57.                     END
  58.                     
  59.                     
  60.                     IF RESULT="RING1" THEN DO
  61.                     
  62.                               ADDRESS COMMAND 'run >NIL: RequestChoice "CIM" "RING1" "OK"'
  63.                     
  64.                     END
  65.                     
  66.                    
  67.            
  68.                     /* change the Type IF correct RING-type was received.
  69.                        In this example we are looking for "RING2" */
  70.                     
  71.                     IF RESULT="RING2" THEN DO
  72.                     
  73.                     
  74.                                    ADDRESS COMMAND 'run >NIL: RequestChoice "CIM" "RING2" "OK"'
  75.                                    
  76.                                    SET_TYPE "FAX"
  77.                     
  78.                                    /* If we want to execute the new Type script,
  79.                                       a script execution reset must be done */
  80.                     
  81.                                    SCRIPT_EXERESET
  82.                                    
  83.                                    /* If FAX script configuration is done and
  84.                                       valid at Settings/Scripts/, then it will be
  85.                                       executed shortly. */
  86.                                       
  87.                                    ADDRESS COMMAND 'run >NIL: RequestChoice "CIM" "CallSign_rexx Changed Type to FAX" "OK"'
  88.  
  89.                     END
  90.                     
  91.                     IF RESULT="RING3" THEN DO
  92.                     
  93.                                    ADDRESS COMMAND 'run >NIL: RequestChoice "CIM" "RING3" "OK"'
  94.                     
  95.                     END
  96.                     
  97.                     
  98.                     IF RESULT="RING4" THEN DO
  99.                     
  100.                                    ADDRESS COMMAND 'run >NIL: RequestChoice "CIM" "RING4" "OK"'
  101.                     
  102.                     END
  103.           
  104.              
  105.  
  106.      END
  107.      
  108.  
  109.  
  110.  
  111.